#include <iostream>
using namespace std;

class Base1
{
public:
  int m_a;

  Base1()
  {
    m_a = 100;
  }
};

class Base2
{
public:
  int m_b;
  int m_a;

  Base2()
  {
    m_b = 200;
    m_a = 500;
  }
};

class Son : public Base1, public Base2
{
public:
  int m_c;
  int m_d;
  Son()
  {
    m_c = 300;
    m_d = 400;
  }
};

void test()
{
  Son s;
  cout << "sizeof Son = " << sizeof(s) << endl;
  // 当父类出现同名成员时，需要加作用域标明
  cout << "m_a = " << s.Base1::m_a << endl;
  cout << "m_a = " << s.Base2::m_a << endl;
}

int main(int argc, char const *argv[])
{

  test();

  return 0;
}